package com.woniuxy.vuecli.controller;

import com.woniuxy.vuecli.entity.ResponseResult;
import com.woniuxy.vuecli.entity.Student;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Author author
 * @Create 2024-01-15 10:09
 */
//@CrossOrigin
@RequestMapping("/student")
@RestController
public class StudentController {

    @RequestMapping("/getAll")
    public ResponseResult<List<Student>> getAll(){
        List<Student> students=new ArrayList<>();
        students.add(new Student(1,"zs",new Date().toString(),"xxx"));
        students.add(new Student(2,"ls",new Date().toString(),"xxx"));
        students.add(new Student(3,"ww",new Date().toString(),"xxx"));
        return new ResponseResult<List<Student>>(200,"ok",students);
    }
}
